package com.lazyboyl.spring.boot.sharding.sphere.proxy.config;

import com.lazyboyl.spring.boot.sharding.sphere.proxy.net.proto.util.Isolations;

/**
 * @author linzf
 * @since 2021-07-02
 * 类描述： proxy的配置信息
 */
public class ProxyConfig {

    public static String DEFAULT_CHARSET = "utf8";
    public static int DEFAULT_TX_ISOLATION = Isolations.REPEATED_READ;

    private int BackendInitialSize = 10;
    private int BackendMaxSize = 20;
    private int BackendInitialWaitTime = 60;
    // 当前后端连接的数据库的配置
    private int MySqlPort = 3306;
    private String MySqlHost = "47.105.71.151";
    private String MySqlUserName = "root";
    private String MySqlPassWord = "575088Wl";
    private String MySqlDatabase = "vcm";

    // sharding-sphere-proxy服务暴露出去的信息
    private int ServerPort =3307;
    private String UserName = "root";
    private String PassWord = "123456";
    private String Database="bg-admin-ant";




    private int IdleCheckInterval=5000;
    private int BackendConnectRetryTimes=3;
    private String version = "5.1.1-spring-boot-sharding-sphere-proxy-1.0";

    public String getDatabase() {
        return Database;
    }

    public void setDatabase(String database) {
        Database = database;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getMySqlUserName() {
        return MySqlUserName;
    }

    public void setMySqlUserName(String mySqlUserName) {
        MySqlUserName = mySqlUserName;
    }

    public String getMySqlPassWord() {
        return MySqlPassWord;
    }

    public void setMySqlPassWord(String mySqlPassWord) {
        MySqlPassWord = mySqlPassWord;
    }

    public int getBackendInitialSize() {
        return BackendInitialSize;
    }

    public void setBackendInitialSize(int backendInitialSize) {
        BackendInitialSize = backendInitialSize;
    }

    public int getBackendMaxSize() {
        return BackendMaxSize;
    }

    public void setBackendMaxSize(int backendMaxSize) {
        BackendMaxSize = backendMaxSize;
    }

    public int getBackendInitialWaitTime() {
        return BackendInitialWaitTime;
    }

    public void setBackendInitialWaitTime(int backendInitialWaitTime) {
        BackendInitialWaitTime = backendInitialWaitTime;
    }

    public String getMySqlHost() {
        return MySqlHost;
    }

    public void setMySqlHost(String mySqlHost) {
        MySqlHost = mySqlHost;
    }

    public int getServerPort() {
        return ServerPort;
    }

    public void setServerPort(int serverPort) {
        ServerPort = serverPort;
    }

    public int getMySqlPort() {
        return MySqlPort;
    }

    public void setMySqlPort(int mySqlPort) {
        MySqlPort = mySqlPort;
    }

    public String getUserName() {
        return UserName;
    }

    public void setUserName(String userName) {
        UserName = userName;
    }

    public String getPassWord() {
        return PassWord;
    }

    public void setPassWord(String passWord) {
        PassWord = passWord;
    }

    public String getMySqlDatabase() {
        return MySqlDatabase;
    }

    public void setMySqlDatabase(String mySqlDatabase) {
        MySqlDatabase = mySqlDatabase;
    }

    public int getIdleCheckInterval() {
        return IdleCheckInterval;
    }

    public void setIdleCheckInterval(int idleCheckInterval) {
        IdleCheckInterval = idleCheckInterval;
    }

    public int getBackendConnectRetryTimes() {
        return BackendConnectRetryTimes;
    }

    public void setBackendConnectRetryTimes(int backendConnectRetryTimes) {
        BackendConnectRetryTimes = backendConnectRetryTimes;
    }
}
